package com.cn.mapper.dao.db5.Equipment;

import com.cn.bean.vo.Equipment.EquipmentStructure;
import com.cn.bean.vo.PartsManagement.EquipmentBasicInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface EquipmentStructureDao {
    List<EquipmentStructure> selectEquipmentStructure(@Param("limit") int limit, @Param("page") int page, @Param("structureCode") String structureCode, @Param("structureName") String structureName);

    List<EquipmentStructure> selectEquipmentStructureChildAll(@Param("ID") int ID);

    int addEquipmentStructure(@Param("ID") int ID, @Param("businessTypeID") int businessTypeID, @Param("structureCode") String structureCode, @Param("structureName") String structureName, @Param("versionStatus") int versionStatus, @Param("version") String version, @Param("description") String description);

    int addEquipmentStructureChile(@Param("cID") int cID, @Param("M0ID") int M0ID, @Param("componentID") int componentID, @Param("categoryID") int categoryID, @Param("isSplit") int isSplit, @Param("isSplitLeftRight") int isSplitLeftRight,
                                   @Param("replacementCycleMethod") String replacementCycleMethod, @Param("cycleDays") String cycleDays, @Param("replacementCycleDailyOutput") BigDecimal replacementCycleDailyOutput,
                                   @Param("partAttributes") int partAttributes, @Param("upperCount") int upperCount, @Param("lowerCount") int lowerCount, @Param("leftCount") int leftCount, @Param("rightCount") int rightCount, @Param("upperLeftCount") int upperLeftCount, @Param("upperRightCount") int upperRightCount, @Param("lowerLeftCount") int lowerLeftCount, @Param("lowerRightCount") int lowerRightCount,
                                   @Param("quantity") int quantity, @Param("measurementUnit") String measurementUnit);

    List<EquipmentStructure> selectEquipmentStructureID(@Param("ID") int ID);

    int addEquipmentStructureChileChild(@Param("equipmentStructure") EquipmentStructure equipmentStructure);

    List<EquipmentStructure> selectEquipmentComponentStructureTableID(@Param("ID") int ID);

    int deleteEquipmentStructure(@Param("ID") int ID);

    int deleteEquipmentStructureChild(@Param("ID") int ID);
    int deleteEquipmentStructureChildID(@Param("ID") int ID);

    List<EquipmentStructure> selectEquipmentComponeChildID(@Param("ID") int ID);

    int updateEquipmentStructureMain(@Param("ID") int ID, @Param("businessTypeID") int businessTypeID, @Param("structureName") String structureName, @Param("versionStatus") int versionStatus, @Param("version") String version, @Param("description") String description);

    List<EquipmentStructure> selectEquipmentStructureMainAuto1();
    EquipmentBasicInfo selectEquipmentMechanicalStructureMapping(@Param("id")int id);
}
